Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit cacd1f64248f317987def9c1cc4509eded826f8b


Parents : da18029
Author : Ivan <ivan@quad4.io>
Signature : Signature validation error
Date : 2026-06-02T09:26:58-05:00

feat(android): add cbor2 version 5.6.5 support and update wheel verification process

Changes
Diff

diff --git a/.github/workflows/android-apk-tag.yml b/.github/workflows/android-apk-tag.yml
index df9676cb..939a2c7e 100644
--- a/.github/workflows/android-apk-tag.yml
+++ b/.github/workflows/android-apk-tag.yml
@@ -171,6 +171,9 @@ jobs:
run: |
set -euo pipefail
required=(
+ "cbor2-5.6.5-*-cp311-cp311-android_24_arm64_v8a.whl"
+ "cbor2-5.6.5-*-cp311-cp311-android_24_x86_64.whl"
+ "cbor2-5.6.5-*-cp311-cp311-android_24_armeabi_v7a.whl"
"aiohttp-3.13.5-*-cp311-cp311-android_24_arm64_v8a.whl"
"aiohttp-3.13.5-*-cp311-cp311-android_24_x86_64.whl"
"aiohttp-3.13.5-*-cp311-cp311-android_24_armeabi_v7a.whl"

diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml
index 749b92a4..cb357322 100644
--- a/.github/workflows/android-build.yml
+++ b/.github/workflows/android-build.yml
@@ -199,6 +199,9 @@ jobs:
run: |
set -euo pipefail
required=(
+ "cbor2-5.6.5-*-cp311-cp311-android_24_arm64_v8a.whl"
+ "cbor2-5.6.5-*-cp311-cp311-android_24_x86_64.whl"
+ "cbor2-5.6.5-*-cp311-cp311-android_24_armeabi_v7a.whl"
"aiohttp-3.13.5-*-cp311-cp311-android_24_arm64_v8a.whl"
"aiohttp-3.13.5-*-cp311-cp311-android_24_x86_64.whl"
"aiohttp-3.13.5-*-cp311-cp311-android_24_armeabi_v7a.whl"

diff --git a/android/app/build.gradle b/android/app/build.gradle
index 4c93264d..45765236 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -108,16 +108,21 @@ tasks.register("syncCodec2JniLibs", Exec) {
tasks.register("verifyVendorWheels") {
doLast {
- def aiohttpVersion = "3.13.5"
+ def vendorPackages = [
+ "aiohttp": "3.13.5",
+ "cbor2": "5.6.5",
+ ]
def wheels = vendorWheelDir.list()?.toList() ?: []
selectedAndroidAbis.each { abi ->
def abiTag = abi.replace("-", "_")
- def prefix = "aiohttp-${aiohttpVersion}-"
- if (!wheels.any { it.startsWith(prefix) && it.contains("android_24_${abiTag}") }) {
- throw new org.gradle.api.GradleException(
- "Missing aiohttp ${aiohttpVersion} wheel for ${abi} in ${vendorWheelDir}. " +
- "Run: bash scripts/build-android-wheels-local.sh --only-recipes aiohttp-3.13"
- )
+ vendorPackages.each { pkg, ver ->
+ def prefix = "${pkg}-${ver}-"
+ if (!wheels.any { it.startsWith(prefix) && it.contains("android_24_${abiTag}") }) {
+ throw new org.gradle.api.GradleException(
+ "Missing ${pkg} ${ver} wheel for ${abi} in ${vendorWheelDir}. " +
+ "Run: bash scripts/build-android-wheels-local.sh --only-recipes ${pkg}-*"
+ )
+ }
}
}
}
@@ -241,7 +246,7 @@ chaquopy {
install "usbserial4a==0.4.0"
install "jaraco.context>=6.1.1"
install "ply>=3.11,<4.0"
- install "cbor2==6.1.1"
+ install "cbor2==5.6.5"
}
}
}

diff --git a/android/chaquopy-recipes/cbor2-5.6/meta.yaml b/android/chaquopy-recipes/cbor2-5.6/meta.yaml
new file mode 100644
index 00000000..db1028d4
--- /dev/null
+++ b/android/chaquopy-recipes/cbor2-5.6/meta.yaml
@@ -0,0 +1,6 @@
+package:
+ name: cbor2
+ version: "5.6.5"
+
+build:
+ number: 1

diff --git a/scripts/build-android-wheels-local.sh b/scripts/build-android-wheels-local.sh
index 8859cf9e..4337d1da 100755
--- a/scripts/build-android-wheels-local.sh
+++ b/scripts/build-android-wheels-local.sh
@@ -659,6 +659,7 @@ with zipfile.ZipFile(src, "r") as zin, zipfile.ZipFile(dst, "w", compression=zip
elif item.filename.endswith(".dist-info/METADATA"):
text = data.decode("utf-8")
text = text.replace("Requires-Dist: numpy>=2.3.4", "Requires-Dist: numpy==${NUMPY_VERSION}")
+ text = text.replace("Requires-Dist: cffi==1.15.1", "Requires-Dist: cffi>=1.15.1")
data = text.encode("utf-8")
zout.writestr(item, data)
PY


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────